package com.yindian.cos.easy.security;

import com.yindian.cos.easy.security.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 * @author zhangchuanhao
 * @create 2018/11/22
 */
@Repository
public interface UserRepository extends JpaRepository<User, Long> {

    /**
     * 根据用户名获取用户
     *
     * @param username
     * @return
     */
    User getUserByUsername(String username);

    /**
     * 根据手机号获取用户
     *
     * @param mobile
     * @return
     */
    User getUserByMobile(String mobile);
}
